import React, { Suspense } from 'react'
import {
  HashRouter as Router,
  Switch,
  Route,
  Redirect
} from "react-router-dom"
import '../css/index.css'

const Index = React.lazy(()=>import('./Index'));

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    }
  }

  componentDidMount() {

  }

  render() {
    return (
      <Suspense fallback={<div><h1>Loading...</h1></div>}>
        <Router>
          <Switch>
            <Route path="/index" >
              <Index/>
            </Route>
            <Redirect to="/index" />
          </Switch>
        </Router>
      </Suspense>
    )
  }
}

export default App
